using System;
using System.Windows.Forms;
using System.Drawing;

namespace HIS
{
    public class AdmissionForm : Form
    {
        private Button btnQueryBedStatus;
        private Button btnPrintAdmissionCard;
        private Button btnReserveBed;
        private DataGridView dgvAdmissionList;

        public AdmissionForm()
        {
            InitializeComponents();
        }

        private void InitializeComponents()
        {
            // 窗体设置
            this.Text = "入院电子申请单";
            this.Size = new Size(800, 600);
            this.StartPosition = FormStartPosition.CenterScreen;

            // 操作按钮区域
            GroupBox gbOperations = new GroupBox
            {
                Text = "操作",
                Location = new Point(10, 10),
                Size = new Size(780, 60)
            };

            btnQueryBedStatus = new Button
            {
                Text = "床位状态查询",
                Location = new Point(10, 25),
                Size = new Size(120, 30)
            };

            btnPrintAdmissionCard = new Button
            {
                Text = "打印入院登记卡",
                Location = new Point(140, 25),
                Size = new Size(120, 30)
            };

            btnReserveBed = new Button
            {
                Text = "床位预约",
                Location = new Point(270, 25),
                Size = new Size(100, 30)
            };

            gbOperations.Controls.AddRange(new Control[] {
                btnQueryBedStatus,
                btnPrintAdmissionCard,
                btnReserveBed
            });

            // 入院申请工作表显示区域
            GroupBox gbAdmissionList = new GroupBox
            {
                Text = "入院申请工作表",
                Location = new Point(10, 80),
                Size = new Size(780, 500)
            };

            dgvAdmissionList = new DataGridView
            {
                Location = new Point(10, 25),
                Size = new Size(760, 465),
                AllowUserToAddRows = false,
                AllowUserToDeleteRows = false,
                ReadOnly = true,
                SelectionMode = DataGridViewSelectionMode.FullRowSelect
            };

            // 添加列
            dgvAdmissionList.Columns.AddRange(new DataGridViewColumn[] {
                new DataGridViewTextBoxColumn { Name = "患者姓名", HeaderText = "患者姓名", Width = 100 },
                new DataGridViewTextBoxColumn { Name = "性别", HeaderText = "性别", Width = 60 },
                new DataGridViewTextBoxColumn { Name = "年龄", HeaderText = "年龄", Width = 60 },
                new DataGridViewTextBoxColumn { Name = "入院科室", HeaderText = "入院科室", Width = 120 },
                new DataGridViewTextBoxColumn { Name = "床位号", HeaderText = "床位号", Width = 80 },
                new DataGridViewTextBoxColumn { Name = "入院时间", HeaderText = "入院时间", Width = 150 },
                new DataGridViewTextBoxColumn { Name = "申请状态", HeaderText = "申请状态", Width = 100 }
            });

            gbAdmissionList.Controls.Add(dgvAdmissionList);

            // 添加控件到窗体
            this.Controls.AddRange(new Control[] {
                gbOperations,
                gbAdmissionList
            });
        }
    }
} 